import { joinToImgBase64 } from '@/components/machine-verification/hooks/index'

export function getFullPuzzleSize(url: string): Promise<{ width: number; height: number }> {
  return new Promise((resolve) => {
    const image = new Image()
    image.src = joinToImgBase64(url)
    image.onload = () => {
      resolve({
        width: image.width,
        height: image.height
      })
    }
  })
}
